home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / service / foxpro2 / report.spr < prev    next >
Text File  |  1994-01-01  |  10KB  |  285 lines

  1. *       ╓─────────────────────────────────────────────────────────╖
  2. *       ║                                                         ║
  3. *       ║ 07/24/91             REPORT.SPR                16:03:25 ║
  4. *       ║                                                         ║
  5. *       ╟─────────────────────────────────────────────────────────╢
  6. *       ║                                                         ║
  7. *       ║ Systems Group                                           ║
  8. *       ║                                                         ║
  9. *       ║ Copyright (c) 1991 Fox Software                         ║
  10. *       ║ 134 West South Boundary                                 ║
  11. *       ║ Perrsyburg, OH  43551                                   ║
  12. *       ║                                                         ║
  13. *       ║ Description:                                            ║
  14. *       ║ This program was automatically generated by GENSCRN.    ║
  15. *       ║                                                         ║
  16. *       ╙─────────────────────────────────────────────────────────╜
  17.  
  18.  
  19. #REGION 0
  20. REGIONAL m.currarea, m.talkstat, m.compstat
  21.  
  22. IF SET("TALK") = "ON"
  23.     SET TALK OFF
  24.     m.talkstat = "ON"
  25. ELSE
  26.     m.talkstat = "OFF"
  27. ENDIF
  28. m.compstat = SET("COMPATIBLE")
  29. SET COMPATIBLE FOXPLUS
  30.  
  31. *       ╓─────────────────────────────────────────────────────────╖
  32. *       ║                                                         ║
  33. *       ║                    Window definitions                   ║
  34. *       ║                                                         ║
  35. *       ╙─────────────────────────────────────────────────────────╜
  36. *
  37.  
  38. IF NOT WEXIST("_pxe0yeynw")
  39.     DEFINE WINDOW _pxe0yeynw ;
  40.         FROM INT((SROW()-13)/2),INT((SCOL()-51)/2) ;
  41.         TO INT((SROW()-13)/2)+12,INT((SCOL()-51)/2)+50 ;
  42.         FLOAT ;
  43.         NOCLOSE ;
  44.         SHADOW ;
  45.         DOUBLE ;
  46.         COLOR SCHEME 5
  47. ENDIF
  48.  
  49.  
  50. *       ╓─────────────────────────────────────────────────────────╖
  51. *       ║                                                         ║
  52. *       ║              REPORT Setup Code - SECTION 2              ║
  53. *       ║                                                         ║
  54. *       ╙─────────────────────────────────────────────────────────╜
  55. *
  56.  
  57. #REGION 1
  58. private x,repotag
  59. dime rtags(100)
  60. rtags(1) = "Record#"
  61. for i = 2 to 256
  62.     if len(tag(i-1)) = 0
  63.         i = i - 1
  64.         dimension rtags(i)
  65.         exit
  66.     else
  67.         rtags(i) = tag(i-1)
  68.     endif
  69. endfor
  70. repotag = iif(len(order())=0,"Record#",order())
  71.  
  72.  
  73. *       ╓─────────────────────────────────────────────────────────╖
  74. *       ║                                                         ║
  75. *       ║                  REPORT Screen Layout                   ║
  76. *       ║                                                         ║
  77. *       ╙─────────────────────────────────────────────────────────╜
  78. *
  79.  
  80. #REGION 1
  81. IF WVISIBLE("_pxe0yeynw")
  82.     ACTIVATE WINDOW _pxe0yeynw SAME
  83. ELSE
  84.     ACTIVATE WINDOW _pxe0yeynw NOSHOW
  85. ENDIF
  86. @ 2,3 SAY "Order By:"
  87. @ 4,36 GET reportok ;
  88.     PICTURE "@*VT \!\<Report;\?\<Cancel" ;
  89.     SIZE 1,11,2 ;
  90.     DEFAULT 1
  91. @ 1,15 GET repotag ;
  92.     PICTURE "@^" ;
  93.     FROM rtags ;
  94.     SIZE 3,12 ;
  95.     DEFAULT 1 ;
  96.     COLOR SCHEME 5, 6
  97. @ 0,1 TO 10,33
  98. @ 7,2 GET toprint ;
  99.     PICTURE "@*C To Print" ;
  100.     SIZE 1,12 ;
  101.     DEFAULT 0 ;
  102.     VALID _pxe0yezeg()
  103. @ 8,2 GET tofile ;
  104.     PICTURE "@*C To File" ;
  105.     SIZE 1,11 ;
  106.     DEFAULT 0 ;
  107.     VALID _pxe0yezni()
  108. @ 6,2 GET Preview ;
  109.     PICTURE "@*C Preview" ;
  110.     SIZE 1,11 ;
  111.     DEFAULT 0 ;
  112.     VALID _pxe0yezz9()
  113. @ 8,15 GET printfile ;
  114.     SIZE 1,17 ;
  115.     DEFAULT " " ;
  116.     VALID _pxe0yf085()
  117.  
  118. IF NOT WVISIBLE("_pxe0yeynw")
  119.     ACTIVATE WINDOW _pxe0yeynw
  120. ENDIF
  121.  
  122. READ CYCLE MODAL ;
  123.     DEACTIVATE _pxe0yf0h4()
  124.  
  125. RELEASE WINDOW _pxe0yeynw
  126.  
  127. #REGION 0
  128. IF m.talkstat = "ON"
  129.     SET TALK ON
  130. ENDIF
  131. IF m.compstat = "ON"
  132.     SET COMPATIBLE ON
  133. ENDIF
  134.  
  135.  
  136. *       ╓─────────────────────────────────────────────────────────╖
  137. *       ║                                                         ║
  138. *       ║                   REPORT Cleanup Code                   ║
  139. *       ║                                                         ║
  140. *       ╙─────────────────────────────────────────────────────────╜
  141. *
  142.  
  143. #REGION 1
  144. if reportok = 1
  145.     x = alltrim(repotag)
  146.     if x = "Record#"
  147.         set order to
  148.     else
  149.         set order to (x)
  150.     endif
  151. endif
  152.  
  153.  
  154. *       ╓─────────────────────────────────────────────────────────╖
  155. *       ║                                                         ║
  156. *       ║ _PXE0YEZEG           toprint VALID                      ║
  157. *       ║                                                         ║
  158. *       ║ Function Origin:                                        ║
  159. *       ║                                                         ║
  160. *       ║ From Screen:         REPORT,     Record Number:    6    ║
  161. *       ║ Variable:            toprint                            ║
  162. *       ║ Called By:           VALID Clause                       ║
  163. *       ║ Object Type:         Check Box                          ║
  164. *       ║ Snippet Number:      1                                  ║
  165. *       ║                                                         ║
  166. *       ╙─────────────────────────────────────────────────────────╜
  167. *
  168. FUNCTION _pxe0yezeg     &&  toprint VALID
  169. #REGION 1
  170. if toprint = 1
  171.     show get preview disabled
  172.     show get tofile disabled
  173.     show get printfile disabled
  174. else
  175.     show gets enabled
  176. endif
  177.  
  178.  
  179. *       ╓─────────────────────────────────────────────────────────╖
  180. *       ║                                                         ║
  181. *       ║ _PXE0YEZNI           tofile VALID                       ║
  182. *       ║                                                         ║
  183. *       ║ Function Origin:                                        ║
  184. *       ║                                                         ║
  185. *       ║ From Screen:         REPORT,     Record Number:    7    ║
  186. *       ║ Variable:            tofile                             ║
  187. *       ║ Called By:           VALID Clause                       ║
  188. *       ║ Object Type:         Check Box                          ║
  189. *       ║ Snippet Number:      2                                  ║
  190. *       ║                                                         ║
  191. *       ╙─────────────────────────────────────────────────────────╜
  192. *
  193. FUNCTION _pxe0yezni     &&  tofile VALID
  194. #REGION 1
  195. if tofile = 1
  196.     printfile = putfile('Print File:',alltrim(printfile),'TXT')
  197.     if empty(printfile)
  198.         tofile = 0
  199.         show gets enabled
  200.     else
  201.         show get toprint disabled
  202.         show get preview disabled
  203.     endif
  204.     show get printfile
  205. else
  206.     printfile = putfile('Print File:',alltrim(printfile),'TXT')
  207.     if empty(printfile)
  208.         tofile = 0
  209.         show get tofile
  210.     endif
  211.     show gets enabled
  212. endif
  213.  
  214.  
  215. *       ╓─────────────────────────────────────────────────────────╖
  216. *       ║                                                         ║
  217. *       ║ _PXE0YEZZ9           Preview VALID                      ║
  218. *       ║                                                         ║
  219. *       ║ Function Origin:                                        ║
  220. *       ║                                                         ║
  221. *       ║ From Screen:         REPORT,     Record Number:    8    ║
  222. *       ║ Variable:            Preview                            ║
  223. *       ║ Called By:           VALID Clause                       ║
  224. *       ║ Object Type:         Check Box                          ║
  225. *       ║ Snippet Number:      3                                  ║
  226. *       ║                                                         ║
  227. *       ╙─────────────────────────────────────────────────────────╜
  228. *
  229. FUNCTION _pxe0yezz9     &&  Preview VALID
  230. #REGION 1
  231. if preview = 1
  232.     show get toprint disabled
  233.     show get tofile disabled
  234.     show get printfile disabled
  235. else
  236.     show gets enabled
  237. endif
  238.  
  239.  
  240. *       ╓─────────────────────────────────────────────────────────╖
  241. *       ║                                                         ║
  242. *       ║ _PXE0YF085           printfile VALID                    ║
  243. *       ║                                                         ║
  244. *       ║ Function Origin:                                        ║
  245. *       ║                                                         ║
  246. *       ║ From Screen:         REPORT,     Record Number:    9    ║
  247. *       ║ Variable:            printfile                          ║
  248. *       ║ Called By:           VALID Clause                       ║
  249. *       ║ Object Type:         Field                              ║
  250. *       ║ Snippet Number:      4                                  ║
  251. *       ║                                                         ║
  252. *       ╙─────────────────────────────────────────────────────────╜
  253. *
  254. FUNCTION _pxe0yf085     &&  printfile VALID
  255. #REGION 1
  256. if empty(printfile)
  257.     tofile = 0
  258.     show gets enabled
  259. else
  260.     show get toprint disabled
  261.     show get preview disabled
  262.     tofile = 1
  263.     show get tofile
  264. endif
  265.  
  266.  
  267. *       ╓─────────────────────────────────────────────────────────╖
  268. *       ║                                                         ║
  269. *       ║ _PXE0YF0H4           Read Level Deactivate              ║
  270. *       ║                                                         ║
  271. *       ║ Function Origin:                                        ║
  272. *       ║                                                         ║
  273. *       ║ From Screen:         REPORT                             ║
  274. *       ║ Called By:           READ Statement                     ║
  275. *       ║ Snippet Number:      5                                  ║
  276. *       ║                                                         ║
  277. *       ╙─────────────────────────────────────────────────────────╜
  278. *
  279. FUNCTION _pxe0yf0h4     && Read Level Deactivate
  280. *
  281. * Deactivate Code from screen: REPORT
  282. *
  283. #REGION 1
  284. ?? chr(7)
  285. return .f.